package com.liuguang.testassert.filter;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.web.FilterChainProxy;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.GenericFilterBean;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @ClassName: MyFilterChainProxy
 * @Description：
 * @Author: wanghr
 * Date: 10:55 AM 2020/6/2
 * Version: 1.0
 */
@Slf4j
//@Configuration
public class MyFilterChainProxy extends FilterChainProxy {
    public MyFilterChainProxy() {
    }

    public MyFilterChainProxy(SecurityFilterChain chain) {
        super(chain);
    }

    public MyFilterChainProxy(List<SecurityFilterChain> filterChains) {
        super(filterChains);
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        log.info("!!!!!!!!!!!!!!!!!!!!!!!!!1过滤器列表：{}",super.getFilterChains());
        super.doFilter(request, response, chain);

    }
}
